package com.audaque.springboot.foshanupload.web.rocketmqdemo.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(
        topic = "transaction_topic",
        consumerGroup = "transaction_topic-string-push",
        selectorExpression = "tx"
)
public class TransactionListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.debug("接收到RocketMQ消息[topic={}] ======> {}", "test", message);
    }
}
